<html>
<title>batch files</title>
<body>
<h1>batch files</h1>
<p>Batch files contain a sequence of DOS commands. By running the batch file, this sequence is run. This can
be used to save time, so that a set of commands does not have to be typed out in full at the
DOS prompt each time.</p>
<p>Batch files are text files, but with the .bat file extension. They can be created or edited with a text
editor such as <a href="../edit.htm">edit</a>.</p>
<p>To run a batch file, simply type its name at the DOS prompt, with or without the .bat extension:</p>
<pre>
   c:\autoexec.bat
   foo
   foo.bat
</pre>
<p>A very important batch file, <a href="autoexec.htm">autoexec.bat</a>, is run automatically when FreeDOS 
starts</p>
<h2>Commands designed for batch files</h2>
Some commands are especially designed for use in programming batch files:
<pre>
   <a href="beep.htm">beep</a>       makes a beeping sound
   <a href="call.htm">call</a>       runs another batch file
   <a href="../choice.htm">choice</a>     prompts the user to make a choice
   <a href="echo.htm">echo</a>       print a message, turn batch file display on/off
   <a href="../for.htm">for</a>        for loop (repeat commands)
   <a href="goto.htm">goto</a>       continue running from somewhere else in the batch file
   <a href="if.htm">if</a>         if condition (choose between two sets of commands)
   <a href="pause.htm">pause</a>      waits for user to press a keyt
   <a href="rem.htm">rem</a>        expanatory remarks for the programmer
   <a href="shift.htm">shift</a>      shifts the numbering of batch file parameters
</pre>
<hr>
<address>
<b>Copyright &copy; 2003 <a href="mailto:worldwiderob@yahoo.co.uk">Rob Platt</a></b>
<br>
This file forms part of The FreeDOS HTML Help Documentation, and is covered
under its terms: see <a href="../../index.htm">index.htm</a><br>
</address>
</body>
</html>